/*
 * OneEntry.h
 *
 * Created on: 05-05-2014
 *     Author: A.W. Janisse
 *
 * Version 1.0: 24-05-2014, Final release
 */

#ifndef ONEENTRY_H
#define ONEENTRY_H

#include <string>
#include <Gate.h>

using namespace std;

class OneEntry : public Gate
{
    public:
        // pre :
        // post: An object is constructed with the given parameters.
        OneEntry(int x, int y, string type);

        // pre :
        // post: If exists the entry is returned else NULL will be returned.
        Gate * getEntry(int nr);

        // pre :
        // post: if there is a free entry then entry equals to gate
        //       and return true else return false.
        bool connectEntryTo(Gate *gate);

        // pre :
        // post: If entry is not NULL then entry is set to NULL and return true
        //       else return false.
        bool removeEntryTo(Gate *gate);

        // pre :
		// post: Please see decendants for a descripion.
        virtual string getDrawingInstruction() = 0;

        // pre :
		// post: Please see decendants for a descripion.
        virtual int getOutputValue() = 0;
    private:
        Gate *entry;
};

#endif // ONEENTRY_H
